//pack11jsclass

var StartUpManager = new startUpManager();

function startUpManager() {
    
    this.functions = new Array();
    this.classes = new Array();

    this.addFunction = function(object,name) {
        this.functions.push(object+"."+name+"();");
    }

    this.loadHandler = function() {
        for(var i=0; i<this.functions.length; i++) {
            eval(this.functions[i]);
        }
        this.initClasses();
        /*if(!getCookie("userin") || (getCookie("userin") && getCookie("preview"))) {
            DekaroMap.init();
        }*/
        //buildMap();
    }

    this.initClasses = function() {
        for(var name in this.classes) {
            element=this.classes[name];
            evalString=element+".element.item=(document.getElementById('"+element+"'));";
            try {
                eval(evalString);
            } catch(e) {
                trace("Wrong className "+element+"   "+evalString+" "+document.getElementById(element));
            }
        }
    }

    this.addClass = function(name) {
        this.classes.push(name);
    }

}

function trace(s){
    /*if(typeof(s)=="undefined") return;
    var str="";
    if(typeof(s)=="string" || typeof(s)=="number") {
        str=s;
    } else {
        for(var e in s){
            str+=e+"="+s[e]+"\n";
        }
    }
    var tracer=document.getElementById("traceArea");
    if(tracer) {
        tracer.value+=str+"\n";
    }*/
}